enum conversion_status {
	CONV_STATUS_DONE,
	CONV_STATUS_MORE_DATA,
	CONV_STATUS_ERROR
};

typedef void (*write_callback)(const char *repr, int repr_count,
		void *user_data);

/* Encode utf-8 codepoint to utf-16 codepoint */
unsigned short
to16(const char *a);

unsigned short
asciibyte(char c);

enum conversion_status
convert_to_pdf16(const char **curr, int *in_bytes_count, int *bytes_used,
		write_callback write_fn, void *userptr);

int
convert_to16(const char *str, unsigned short *charpool,
		unsigned poolcount, unsigned short **opt_out);

